/*package com.shankungfu.view;

import android.app.Dialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import android.widget.TextView;

import com.mobile17173.game.R;
import com.mobile17173.game.MainActivity;
import com.mobile17173.game.MainApplication;
import com.mobile17173.game.PlayRecordAndCollectionActivity;

public class dialogMode extends Dialog implements android.view.View.OnClickListener{
	
	private Context context;
	private buttonCallBack callBack;
	private String showText = "亲，你确定删除吗？";
	private String showSureText = "确定";
	private String showCancelText = "取消";
	private String showTitleText = "检测到新版本";
	private  SharedPreferences mSharedPreferences;
	public dialogMode(Context context, boolean cancelable,
			OnCancelListener cancelListener, buttonCallBack callBack) {
		super(context, cancelable, cancelListener);
		this.context = context;
		this.callBack = callBack;
		
	}
	
	
	public dialogMode(Context context, int theme, buttonCallBack callBack) {
		super(context, theme);
		this.context = context;
		this.callBack = callBack;
	}

	public dialogMode(Context context, buttonCallBack callBack) {
		super(context);
		this.context = context;
		this.callBack = callBack;
	}
	
	public String getShowText() {
		return showText;
	}

	public void setShowText(String showText) {
		this.showText = showText;
	}
	public void setShowTitleText(String showTitleText) {
		this.showTitleText = showTitleText;
	}
	

	public String getShowSureText() {
		return showSureText;
	}

	public void setShowSureText(String showSureText) {
		this.showSureText = showSureText;
	}

	public String getShowCancelText() {
		return showCancelText;
	}

	public void setShowCancelText(String showCancelText) {
		this.showCancelText = showCancelText;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
//		requestWindowFeature(Window.FEATURE_NO_TITLE);
		
		setContentView(R.layout.dialog_mode_layout);
		
		findViewById(R.id.sure).setOnClickListener(this);
		findViewById(R.id.cancel).setOnClickListener(this);
		((TextView) findViewById(R.id.tv)).setText(showText);
		((TextView) findViewById(R.id.sure)).setText(showSureText);
		((TextView) findViewById(R.id.cancel)).setText(showCancelText);
		((TextView) findViewById(R.id.title)).setText(showTitleText);
		setWindow();
	}
	
	private void setWindow() {
		LayoutParams p = getWindow().getAttributes(); // 获取对话框当前的参数值
		p.height = (int) (MainApplication.screenHight * 0.6); 
		p.width = (int) (MainApplication.screenWidth * 0.9); 
		
		// p.x =0;//这两句设置了对话框的位置．0为中间
		// p.y =180;
		p.alpha = 1f;
		getWindow().setAttributes(p); // 设置生效

		TextView mMessageText = (TextView) findViewById(R.id.tv);

	
	}


	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.cancel://取消
			callBack.negativeButton();
			dismiss();
			break;
		case R.id.sure:	//删除图片
				callBack.positiveButton();
			dismiss();
			break;

		default:
			break;
		}
	}
	
	public interface buttonCallBack {
		public void positiveButton();
		public void negativeButton();
	}
	

}
*/